package com.after.saas.file.domain.vo;

import java.math.BigDecimal;

/**
 * @Classname AmountItem
 * @Description TODO
 * @auth after
 * @since 2025/9/26 21:04
 */
public class AmountItem {
    private String id;
    private BigDecimal amount;
    private BigDecimal discountAmount;
    private BigDecimal availableAmount;

    public AmountItem(String id, BigDecimal amount) {
        this.id = id;
        this.amount = amount;
        this.discountAmount = BigDecimal.ZERO;
        this.availableAmount = amount;
    }

    public String getId() { return id; }
    public BigDecimal getAmount() { return amount; }
    public BigDecimal getDiscountAmount() { return discountAmount; }
    public void setDiscountAmount(BigDecimal discountAmount) { this.discountAmount = discountAmount; }
    public BigDecimal getAvailableAmount() { return availableAmount; }
    public void setAvailableAmount(BigDecimal availableAmount) { this.availableAmount = availableAmount; }

    @Override
    public String toString() {
        return String.format("Item{id='%s', amount=%.2f, discount=%.2f, available=%.2f}",
                id, amount, discountAmount, availableAmount);
    }
}
